home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr36 / mapl0301.zip / TESTUP.BAT < prev    next >
DOS Batch File  |  1993-04-13  |  4KB  |  155 lines

  1. rem Summary of parameters that RBBS will pass to the archive test file:
  2.  
  3. rem  %1 - The Complete File/pathname of the file to be tested - stock in RBBS
  4. rem  %2 - drive/subdir name of uploaded file  eg C:\Upload (no trailing "\")
  5. rem  %3 - First name of Filename  Eg TEST (no ".")
  6. Rem  %4 - Extension of Filename   Eg  ARJ (no ".")
  7. rem  %5 - Node Id of the call    
  8. rem  %6 - The file to which you write out a failure string - stock in RBBS
  9. rem  %7 - The communications port in use  eg COM0  (no ":"
  10. rem  %8 - users first name
  11. @Echo off
  12.  
  13. rem turn on Gateway2 if you are using it....
  14. Ctty Gate%5
  15.  
  16. rem get rid of previouse Convertflag
  17. rem this is needed to let RBBS know you did a Convert and not just a test
  18.  
  19. IF Exist C:\CNVT2ZIP.%5 DEL c:\CNVT2ZIP.%5
  20.  
  21. Rem Add an EXE and COM  Label if you wish to convert EXE and COM Files also
  22. Rem Same goes for DOC files or whatever extension you wish to convert
  23. IF %4 == ZIP goto ZIP
  24. IF %4 == ARJ goto ARJ
  25. If %4 == ARC Goto ARC
  26. If %4 == PAK GOTO PAK
  27. IF %4 == LZH Goto LZH
  28. if %4 == ZOO GOTO ZOO
  29. IF %4 == TXT GOTO TXT
  30. IF %4 == BAS GOTO BAS
  31. GOTO EXIT
  32.  
  33. :ZIP
  34. Pkunzip -o %1 File_ID.DIZ c:\RBBS
  35. Pkunzip -o %1 DESC.SDI c:\RBBS
  36. seterror 0
  37. PTEST %1 C:\RBBS\Ptest.cfg
  38. if errorlevel 1 echo Bad Upload > %6
  39. GOTO EXIT
  40.  
  41. :ARJ
  42. rem Remove the CALLZ line if you want to test ARJ files with ZipLab
  43. rem PTEST %1 C:\RBBS\Ptest.cfg
  44. rem if errorlevel 1 echo Bad Upload > %6
  45.  
  46. rem create Flag file for RBBS to read when Converting to ZIP
  47. echo ... >c:\Cnvt2Zip.%5
  48. CALLZ %3 %5 ARJ C:\WORK\ ARJ E %2\ \
  49. GOTO EXIT
  50.  
  51. :ARC
  52. echo ... >c:\Cnvt2Zip.%5
  53. CALLZ %3 %5 ARC C:\WORK\ PAK E %2\
  54. GOTO EXIT
  55.  
  56. :PAK
  57. echo ... >c:\Cnvt2Zip.%5
  58. CALLZ %3 %5 PAK C:\WORK\ PAK E %2\
  59. GOTO EXIT
  60.  
  61. :ZOO
  62. echo ... >c:\Cnvt2Zip.%5
  63. CALLZ %3 %5 ZOO C:\WORK\ LOOZ X %2\ \
  64. GOTO EXIT
  65.  
  66. :LZH
  67. echo ... >c:\Cnvt2Zip.%5
  68. CALLZ %3 %5 LZH C:\WORK\ LHA E %2\ \
  69. GOTO EXIT
  70.  
  71. :TXT
  72. echo ... >c:\Cnvt2Zip.%5
  73. md C:\WORK\%5
  74. copy %1 C:\WORK\%5
  75. DEL %1
  76. pkzip -a -ex %2\%3 C:\WORK\%5\*.*
  77. IF ERRORLEVEL 1 GOTO badupload
  78.  
  79. proecho %node% ~ Now lets see how old the files in %3.ZIP are.......~~
  80. copy %2\%3.ZIP C:\WORK\%5
  81. ZIPDS C:\WORK\%5\*.zip
  82. testage C:\WORK\%5 1989 c:\RBBS\hold
  83. if exist c:\RBBS\hold\%3.zip goto baddates
  84. if not exist c:\RBBS\hold\%1.zip goto thanks
  85.  
  86. :baddates
  87. proecho %node% At least one of the programs you uploaded is~
  88. proecho %node% more than 2 years old.  I will move any old~
  89. proecho %node% programs offline for evaluation by the sysop.~
  90. proecho %node% ~Please DO NOT upload items over 2 years old.~~
  91. copy %2\%3.zip c:\RBBS\hold
  92. del %2\%3.ZIP
  93. goto exit
  94.  
  95. :badupload
  96. proecho %node% Looks like one or more uploads are no good...~
  97. proecho %node% I will move all file(s) you just uploaded~
  98. proecho %node% offline for manual evaluation by the sysop.~
  99. copy %2\%3.zip c:\RBBS\hold
  100. del %2\%3.zip
  101. goto exit
  102.  
  103. :thanks
  104. proecho %node% ~Upload file dates are fine. ~~
  105. GOTO EXIT
  106.  
  107. :BAS
  108. echo ... >c:\Cnvt2Zip.%5
  109.  
  110. md C:\WORK\%5
  111. echo off
  112. copy %1 C:\WORK\%5
  113. DEL %1
  114. pkzip -a -ex  %2\%3 C:\WORK\%5\*.*
  115. IF ERRORLEVEL 1 GOTO badupload
  116.  
  117. :GOOD
  118. proecho %node% ~Now lets see how old the files in %3.ZIP are.......~~
  119. copy %2\%3.ZIP C:\WORK\%5
  120. zipds C:\WORK\%5\*.zip
  121. testage C:\WORK\%5 1989 c:\RBBS\hold
  122. if exist c:\RBBS\hold\%3.zip goto baddates
  123. if not exist c:\RBBS\hold\%3.zip goto thanks
  124.  
  125. :baddates
  126. proecho %node% At least one of the programs you uploaded is~
  127. proecho %node% more than 2 years old.  I will move any old~
  128. proecho %node% programs offline for evaluation by the sysop.~
  129. proecho %node% ~Please DO NOT upload items over 2 years old.~~
  130. copy %2\%3.zip c:\RBBS\hold
  131. del %2\%3.ZIP
  132. goto exit
  133.  
  134. :badupload
  135. proecho %node% Looks like one or more uploads are no good...~
  136. proecho %node% I will move all file(s) you just uploaded~
  137. proecho %node% offline for manual evaluation by the sysop.~
  138. copy %2\%3.zip c:\RBBS\hold
  139. del %2\%3.zip
  140. goto exit
  141.  
  142. :thanks
  143. proecho %node% ~Upload file dates are fine. ~~
  144. GOTO EXIT
  145.  
  146. :EXIT
  147. seterror 0
  148. kdy C:\WORK\%5
  149. SETERROR 0
  150. echo on
  151.  
  152. rem turn Gateway off 
  153. ctty con
  154. c:
  155. cd\RBBS